﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;

namespace ECard.Controllers
{
    public class RoleController
    {
        private SqlConnection conn = ConnectDatabase.GetConnection();
        private SqlDataAdapter da;
        public DataTable dt;

        public DataTable GetAll()
        {
            string query = "Select * from tblRole";
            da = new SqlDataAdapter(query, conn);
            dt = new DataTable();
            conn.Open();
            da.Fill(dt);
            conn.Close();
            return dt;
        }
    }
}